package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class SelfCertifyMethods extends BaseMethods {

    private static SelfCertifyMethods m_ins = null;

    public static SelfCertifyMethods getInstance() {
        if (m_ins == null) {
            synchronized (SelfCertifyMethods.class) {
                if (m_ins == null) {
                    m_ins = new SelfCertifyMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Personal/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void self_auth(Subscriber<Object> subscriber,
                      int uid ,
                      String hashid ,String pic  ) {
        Observable observable = initService().self_auth(System.currentTimeMillis()+"",
                "d693bd4cb2fab676d7960e25ae1344a2",uid,hashid ,pic
        );
        toSubscribe(observable, subscriber);
    }
}
